package com.itcast.yuanyuan.oademo.dao.impl;

import java.util.List;

import org.mybatis.spring.support.SqlSessionDaoSupport;
import org.springframework.stereotype.Repository;

import com.itcast.yuanyuan.oademo.dao.IUserDao;
import com.itcast.yuanyuan.oademo.pojo.User;
public class UserDaoImpl extends SqlSessionDaoSupport implements IUserDao {
	public UserDaoImpl() {
		System.out.println("UserDaoImpl()...构造方法");
	}

	@Override
	public User selectUserById(String id) {
		if (this.getSqlSession() == null) {
			System.out.println("SqlSession为null");
		}
		return this.getSqlSession().selectOne(
				"com.itcast.yuanyuan.oademo.pojo.User.selectUserById", id);
	}

	@Override
	public List<User> selectUserByCondition(User u) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public int deleteUserById(String id) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int updateUserByCondition(User u) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int insertUser(User u) {
		// TODO Auto-generated method stub
		return 0;
	}

}
